import config from '../utils/config.js';
import { Logger } from './logger.js';
import * as YAML from 'yaml';

const logger = new Logger('[config:demo]');

const runConfigDemo = async () => {
  logger.info(`Root Directory: ${config.findRootDir()}`);

  logger.info(`env key 'test': ${config.get('test', 'not found')}`);

  logger.info('scripts:\n' + YAML.stringify(config.yamlConfig));

  logger.info('packageJson:\n' + JSON.stringify(config.packageJson, null, 2));
};

runConfigDemo();
